import 'package:fluro/fluro.dart';
import 'package:fluro/src/router.dart';
import 'package:flutter_shop/pages/member/my_map/my_map.dart';
import 'package:flutter_shop/pages/member/person_info/person_info_page.dart';
import 'package:flutter_shop/pages/member/select_dept/select_dept_page.dart';
import 'package:flutter_shop/pages/member/select_people/select_people_page.dart';
import 'package:flutter_shop/routers/router_init.dart';

class MemberRouter implements IRouterProvider {
  ///我的地图
  static const String myMap = "/MyMap";

  ///个人信息
  static const String personInfo = "/personInfo";

  ///选择部门
  static const String selectDept = "/selectDept";

  ///选择人员
  static const String selectPeople = "/selectPeople";

  @override
  void initRouter(Router router) {
    //我的地图
    router.define(myMap, handler: Handler(handlerFunc: (context, params) {
      return MyMap();
    }));

    //个人信息
    router.define(personInfo, handler: Handler(handlerFunc: (context, params) {
      return PersonInfoPage();
    }));

    //选择部门
    router.define(selectDept, handler: Handler(handlerFunc: (context, params) {
      return SelectDeptPage();
    }));

    //选择人
    router.define(selectPeople, handler: Handler(handlerFunc: (context, params) {
      return SelectPeoplePage();
    }));
  }
}
